# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-arpeggio
pkgver=2.0.2
pkgrel=1
pkgdesc="Packrat parser interpreter"
url="https://github.com/textX/Arpeggio"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('python-pytest-runner' 'python-setuptools' 'python-wheel')
source=("https://github.com/textX/Arpeggio/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('53628b94c5181a5768be686d7c27178f77823065164dcaa421125aa3c5f2fedf2bf9e54761b92a73832dd9ae667a23eaa4ca3b00155d1acd800c00acf0f449a4')

build() {
  cd Arpeggio-$pkgver
  python setup.py build
}

check() {
  cd Arpeggio-$pkgver
  python setup.py pytest
}

package() {
  cd Arpeggio-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
